package logger

import (
	"github.com/astaxie/beego/logs"
)

var Log *logs.BeeLogger

func init()  {
	Log = logs.NewLogger(10000)
	jsonConfig := `{
        "filename" : "./hulk.log", 
        "maxlines" : 1000,      
        "maxsize"  : 10240       
    }`
	Log.SetLogger("file", jsonConfig)
	Log.SetLevel(logs.LevelDebug)
	Log.EnableFuncCallDepth(true)

	//Log.Emergency("Emergency")
	//Log.Alert("Alert")
	//Log.Critical("Critical")
	//Log.Error("Error")
	//Log.Warning("Warning")
	//Log.Notice("Notice")
	//Log.Informational("Informational")
	//Log.Debug("Debug")

	//Log.Flush() // 将日志从缓冲区读出，写入到文件
	//log.Close()
}
